<{include file ="header.tpl"}>
<{include file ="navibar.tpl"}>
<{include file ="sidebar.tpl"}>
<!-- START 以上内容不需更改，保证该TPL页内的标签匹配即可 -->
<{$osadmin_action_alert}>
<{$osadmin_quick_note}>

<div class="block">
    <a href="#page-stats" class="block-heading" data-toggle="collapse">产品列表</a>

    <div id="page-stats" class="block-body collapse in">
        <table class="table table-striped">
            <thead>
            <tr style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">产品ID</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">产品名称</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">产品型号</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">产品类型</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">类型名称</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">原价</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">特价</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">首页显示</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">预览</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">添加颜色</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">添加首页产品缩略图</th>
                <th style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">是否上架</th>
            </tr>
            </thead>
            <tbody>

            <{foreach name=product from=$products item=product}>
                <tr style="background:#fff;">
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;"><{$product.products_id}>
                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <{$product.products_name}>
                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <{$product.products_model}>

                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <{$product.products_type}>

                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;"><{$product.type_name}>

                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <{$product.products_price}>

                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <{$product.products_special_price}>
                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <{if $product.products_index > 0 }>
                    <img width=30 height=auto src="<{$smarty.const.ADMIN_URL}>/assets/images/gou.png"/>
                        <{else}>
                    <img width=30 height=auto src="<{$smarty.const.ADMIN_URL}>/assets/images/cha.png"/>
                        <{/if}>
                    </td>
                    <{if $product.products_index > 0 }>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;"><a class="btn btn-info"
                                                                                                   href="product.php?id=<{$product.products_id}>"
                                                                                                   target="_blank"
                                                                                                   title="预览"
                                                                                                   alt="预览">预览</a></td>
                    <{else}>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;"></td>
                    <{/if}>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <a class="btn btn-info"
                           href="product_add_color.php?id=<{$product.products_id}>&model=<{$product.products_model}>"
                           target="_self" title="添加颜色"
                           alt="添加颜色">添加颜色</a></td>
                    </td>
                    </td>
                    <td style="background:#fff;color:#000;font-size: 14px;font-weight: normal;">
                        <a class="btn btn-info"
                           href="product_add_small.php?id=<{$product.products_id}>&model=<{$product.products_model}>"
                           target="_self" title="添加产品缩略图"
                           alt="添加产品缩略图">添加产品缩略图</a></td>
                    </td>

                    <{if $product.products_index > 0 }>
                    <td style="color:red;font-size: 14px;font-weight: normal;">
                        <a class="btn btn-info"
                           href="product.php?id=<{$product.products_id}>&model=<{$product.products_model}>&action=modyindex&status=down"
                           target="_self" title="下架"
                           alt="下架"><span style="color: yellow;">下架</span></a></td>
                    </td>
                    <{else}>
                    <td style="color:blue;font-size: 14px;font-weight: normal;">
                        <a class="btn btn-info"
                           href="product.php?id=<{$product.products_id}>&model=<{$product.products_model}>&action=modyindex&status=up"
                           target="_self" title="上架"
                           alt="上架"><span style="color: blue;">上架</span></a></td>
                    </td>
                    <{/if}>
                </tr>
                <{/foreach}>
            </tbody>
        </table>

    </div>
</div>

<!---操作的确认层，相当于javascript:confirm函数--->
<{$osadmin_action_confirm}>

<!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
<{include file="footer.tpl" }>